package cn.tedu._01mvcboot01.controller;

import cn.tedu._01mvcboot01.pojo.dto.VehicleAddDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class VehicleController {
    @RequestMapping("v1/vehicle/add1")//请求的注解，用来给请求引路的注解
    @ResponseBody//允许以字符串的形式给浏览器客户端返回信息
    public String add1(String brand,String model,Double price){
        return "添加成功";
    }
    @RequestMapping("v1/vehicle/add2")
    @ResponseBody
    public String add2(VehicleAddDTO vehicleAddDTO){
        System.out.println(vehicleAddDTO);
        return "添加成功";
    }
}
